package org.smartercontext.contextmger.communication;

/**
 * 
 * @author JuanPablo
 * @version 1.0
 * @creation_date 09 Mar 2014
 * Public Interface for the communication components (Remote and Server)
 *
 */
public interface ICommunication {
	
	/**
	 * 
	 * @param JSONLogin
	 * @return boolean
	 * This method receive an String that content a JSON description
	 * with the user's credentials for external login on SmarterContext
	 */
	public boolean login(String login, String format);
	
	/**
	 * 
	 * @param JSONPreferences
	 * This method receive an String that content a JSON description
	 * with the user's buy preferences.
	 */
	public void receiveBuyerPreferences(String preferences, String format);
	
	/**
	 * 
	 * @param JSONLocation
	 * This method receive an String that content a JSON description
	 * with the user's current location
	 */
	public void receiveCurrentLocation (String location, String format);
	
	public String provideContext (String username, String typeInf, String format);

}
